This invention relates to a single-chip microcomputer which can read out the encrypted contents of a program memory.
In recent years, program memory, data memory and input/output interface along with central processing unit have been integrated onto one chip. This chip, then, has come to be used as a single-chip microcomputer, or a computer on a chip.
FIG. 1 is a block diagram showing an example of such a microcomputer 1. This microcomputer 1 has a mask ROM 3, which stores the programs, a RAM 5, which is used such as a temporary data storage and a work area and so on, an input/output port 7, an instruction decoder 9, which decodes the instructions of the program stored in the ROM 3, an accumulator 11, which is used to store intermediate calculation results and to perform arithmetic logic calculations, a temporary register 13 for temporarily storing the data on which an arithmetic logic unit operates, and an arithmetic logic unit 15 (ALU), which operates on the data stored in the accumulator 11 and temporary register 13. Each of these elements are connected through a bus 17. The instructions read from the ROM 3 are decoded by an instruction decoder 9 and, based on these control signals, the processing data is read from the RAM 5, or the input port, and set in the temporary register 13 and accumulator 11. The processed result by the ALU 15 is stored in the RAM 5, or is transmitted to an output port 7 through the bus 17.
In order to verify the contents of the program memory, etc., this kind of microcomputer often is arranged so that the contents can be read out from the outside. An example of this kind of microcomputer is an 8-bit, single-chip microcomputer 8048 designed by Intel Corp. of the U.S.A. If the address is supplied to the X1 and X2 terminals (not shown) the address terminal and clock signals are supplied to and the timing signals are supplied to the EA and RESET terminals with specified timings, the contents at a designated address of the ROM will be output on the output terminals.
In this kind of device, however, the program contents of the ROM 3 can easily be read out by a third party, resulting in unexpected damage to the contents of this device, or the original maker of the application program on this device. In other words, a third party can read out the contents of the ROM and copy it.
There are microcomputers in which it is impossible to read out the contents of the ROM from the outside but these have the disadvantage that the program contents can not be verified in shipping and delivery inspections.
Another method of preventing copying by a third party is to use a particular and exclusive code as the instruction code but this method results in reduced uses, difficulty in utilization of standard support softwares and difficulty in modifying the already developed programs.